| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /*jslint browser */ |
||
| 4 | loadChart: function(domId, chartUrl, course_id, department_id = false) { |
||
| 5 | fetch("chart/" + chartUrl + "?course_id=" + course_id + (department_id !== false ? "&department_id=" + department_id : "")) |
||
| 6 | .then(function (response) { |
||
| 7 | return response.json(); |
||
| 8 | }).then(function (data) { |
||
| 9 | new Chart($(domId), data); |
||
|
|
|||
| 10 | }); |
||
| 11 | } |
||
| 12 | } |
||
| 13 |